const express = require('express');
const router = express.Router();

const researcherService = require('../service/researcherService')

// 表单验证
const expressJoi = require('@escook/express-joi')
const { researcher_insert,researcher_update } = require('../rule/researcherRule')

router.get('', researcherService.researcher);

router.get('/byId', researcherService.researcherById);

router.post('/add', expressJoi(researcher_insert), researcherService.add);

router.post('/delete', researcherService.delete);

router.post('/update', expressJoi(researcher_update), researcherService.update);


module.exports = router;
